package com.sky;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class CodeInterviewApplication {

    public static void main(String[] args) {

        SpringApplication.run(CodeInterviewApplication.class, args);
        //String applicationName = context.getEnvironment().getProperty("applicationName");
        //System.out.println(applicationName);
        // AnnotationConfigServletWebServerApplicationContext 最终得到的容器的类型
        //System.out.println(context.getClass());
        //CodeInterviewApplication bean = context.getBean(CodeInterviewApplication.class);
        //System.out.println(bean);


        // 获取bean定义及user bean定义
        //ConfigurableListableBeanFactory beanFactory = context.getBeanFactory();
        //BeanDefinition userBdf = beanFactory.getBeanDefinition("user");
        //System.out.println(userBdf.getClass());
        //// 获取getMessageText bean定义
        //BeanDefinition getMessageTextBdf = beanFactory.getBeanDefinition("getMessageText");
        //System.out.println(getMessageTextBdf.getClass());

        //System.out.println(context.getBean("teacher"));
    }

}
